<?php 
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Post;
use yii\helpers\ArrayHelper;
use common\models\Card;
use common\models\YrClass;


$data = Yrclass::find()->all();
$set = ArrayHelper::map($data,'id','name');

$set1 = ArrayHelper::map($data,'teacher_id','class_table');

 // dd($set);
 ?>

<div class="card-form">
	<?php $form = ActiveForm::begin([ 
		'action' => ['sel'], 
		'method'=>'post', ])
		?>
    <?=$form->field($class, 'name')->dropDownList($set,['prompt'=>'请选择班级'])->label('班级');?>
    <?=$form->field($class, 'class_table')->dropDownList($set1,['prompt'=>'请选择上课时间上课时间'])->label('上课时间');?>
	
    <div class="form-group">
        <?= Html::submitButton('进入打卡', ['class' => 'btn btn-success']) ?>
    </div>
    
    <?php ActiveForm::end(); ?>
    

</div>
